@model TemplateContext<Presentation>
	
@{
	Presentation contextObject = Model.Object;
}

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta charset="utf-8" />
		<link rel="stylesheet" type="text/css" href="..\styles\pres.css" />
		<link rel="stylesheet" type="text/css" href="..\styles\master.css" />
	</head>
   <body>
	   <br />
	   @for(int i = 0; i<contextObject.Slides.Count; i++)
		{
			var slide = contextObject.Slides[i];
			if (slide.Hidden)
			{
				continue;
			}
			
			var slidePage = "slide" + slide.SlideNumber + ".html";
			var thumbnailSource = "..\\images\\thumbnail" + slide.SlideNumber + ".png";
			
			if (Model.Global.Get<bool>("embedImages"))
			{
				using (var ms = new System.IO.MemoryStream())
				{
					var slideThumbnail = slide.GetThumbnail();
					slideThumbnail.Save(ms, ImageFormat.Png);
					thumbnailSource = "data:image/png;base64, " + Convert.ToBase64String(ms.ToArray());
				}
			}
			
			<a href = "@slidePage" target = "slide_page" class="thumbnail"><img src="@thumbnailSource"/></a>
			<br />
			<br />
		}
   </body>
	
</html>